<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%@ page language = "java"	import="java.io.*" %>


<%
	int iMsgID = 0; // 1-Success, 2- Error
	String sTmp = "";
	String sMessage = "";	
	String sClassName = "success";		
	long lRecordCount = 0;
	long lDupliRecCount = 0;
			
	sTmp = request.getParameter("MsgID");
	if ( sTmp != null && !sTmp.equals("null") && !sTmp.equals("") )
		iMsgID = Integer.parseInt(sTmp);
		
	if ( iMsgID == 1 ) // Add Successfully
		sMessage = " Record saved successfully ";
	else if ( iMsgID == 2 )
	{
		sClassName = "compelseary";
		sMessage = " Record saved failed ";
	}
	else if ( iMsgID == 3) // Process Update Successfully
		sMessage = " Record updated successfully ";
	else if ( iMsgID == 4)
	{
		sClassName = "compelseary";
		sMessage = " Record updated failed ";	
	}
	else if ( iMsgID == 5 ) // Process Update Successfully
		sMessage = " Permission has been updated successfully ";
	else if ( iMsgID == 6 )
	{
		sClassName = "compelseary";
		sMessage = " Permission has been updated failed ";		
	}
	else if ( iMsgID == 7 ) // Upload Successfully
		sMessage = " Excel File Upload successfully ";
	else if ( iMsgID == 8 )
	{
		sClassName = "compelseary";
		sMessage = " Excel File Upload failed ";		
	}
	else if ( iMsgID == 9 )
		sMessage = " Possword Successfully send your Email address";	
	else if ( iMsgID == 10 )
		sMessage = " Possword Successfully Changed";	
	else if ( iMsgID == 11 )
	{
		sClassName = "compelseary";
		sMessage = " Unable to connect Database ";		
	}
	else if ( iMsgID == 12 )
	{
		sClassName = "compelseary";
		sMessage = " No Questions Found ";		
	}
	else
	{
		sClassName = "compelseary";
		sMessage = " Record not saved ";
	}
	
	/*
		sTmp = request.getParameter("RecCount");
	*/
	
	if ( iMsgID == 7 || iMsgID == 8 ) // Excel Upload Successfully
	{
		sTmp = request.getParameter("RecCount");
		if ( sTmp != null && !sTmp.equals("null") && !sTmp.equals("") )
			lRecordCount = Long.parseLong(sTmp);
		sTmp = request.getParameter("DuRecCount");
		if ( sTmp != null && !sTmp.equals("null") && !sTmp.equals("") )
			lDupliRecCount = Long.parseLong(sTmp);	

		sMessage += "<br> Excel Total Records : "+ lRecordCount ;				
		if ( lRecordCount > 0 )
			sMessage += "<br> Uploaded Records : "+ (lRecordCount-lDupliRecCount);		
		if ( lDupliRecCount > 0 )
			sMessage += "<br> Duplicate Records : "+ lDupliRecCount;					
	}
	
%>

<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>Duediligencebarbados</title>
	<link href="css/default.css" rel="stylesheet" type="text/css" />
<!-- Menu -->	
	<link type="text/css" href="menu/menu.css" rel="stylesheet" />
    <script type="text/javascript" src="menu/menu.js"></script>

<script type='text/javascript'>
</script>		

<script type='text/javascript'>
	var vLoginStatus = 0;
	var vUserType = 0;
<% if ( session.getAttribute("SES_USERSNO") != null ) { %>
	vLoginStatus = <%=(String)session.getAttribute("SES_USERSNO")%>;
	vUserType = <%=(Integer)session.getAttribute("SES_USERTYPE")%>;
<% } %>
	window.onload=function()
	{
		var theHeight;
		if (window.innerHeight) {
			theHeight=window.innerHeight;
		}
		else if (document.documentElement && document.documentElement.clientHeight) {
			theHeight=document.documentElement.clientHeight;
		}
		else if (document.body) {
			theHeight=document.body.clientHeight;
		}
		document.getElementById('innerContent').style.minHeight = (theHeight-242) +'px';
	}
</script>

</head>

<body>
<table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0" >
<tr><td align="center">
<table width="1004px" cellpadding="0" cellspacing="0" border="0" class="formbk" >
<tr> <td align="center" >
<table width="100%" border="0" cellspacing="0" cellpadding="0" id="wrapper" >
<tr><td align="center"><script src="top.js"></script></td></tr>
<tr><td>&nbsp;</td></tr>
<tr><td>&nbsp;</td></tr>
<tr><td>&nbsp;</td></tr>
<tr><td>&nbsp;</td></tr>
<tr><td align="center" ><div id="innerContent">
	<table width="50%" cellpadding="0" cellspacing="0" border="0"  bgcolor="#FFFFFF" >
		<tr><td>&nbsp;</td></tr>		
		<tr><td>&nbsp;</td></tr>		
		<tr><td>&nbsp;</td></tr>							
		<tr>
			<td valign="top" align="center" class="mainhead" >Status</td>
		</tr>
		<tr><td>&nbsp;</td></tr>		
		<tr>
			<td valign="top" align="center" class="<%=sClassName%>" ><%=sMessage%></td>
		</tr>
		<tr><td>&nbsp;</td></tr>		
		<tr><td>&nbsp;</td></tr>		
		<tr><td>&nbsp;</td></tr>												
	</table></div></td>
</tr>
<tr><td align="center"><script src="bottom.js"></script></td></tr>
</table>
</td></tr></table></td></tr>
</table>
</body>
</html>